def factorial(n):
    return 1 if n == 1 else n * factorial(n - 1)

def factorial2(n):
    fac = 1
    for i in range(1,n+1):
        fac = fac*i
    return fac

def factorial3(n, b=1):
    if n < 2:
        return b
    return factorial3(n-1, n*b)
    pass

print(factorial(15))
print(factorial2(15))
print(factorial3(15))